home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1998 August / Software of the Month Club 1998 August.iso / mac / Business / Wallaby / Java / ScrollingText / ScrollText / ScrollText.class (.txt)
Encoding:
Java Class File  |  1998-06-03  |  1.6 KB  |  60 lines  |  [Clss/MWZP]

  1. import java.applet.Applet;
  2. import java.awt.Color;
  3. import java.awt.Component;
  4. import java.awt.Event;
  5. import java.awt.Graphics;
  6.  
  7. public class ScrollText extends Applet implements Runnable {
  8.    Thread killme;
  9.    Color white = new Color(255, 255, 255);
  10.    Color gray = new Color(166, 166, 166);
  11.    Color lightgray = new Color(240, 240, 240);
  12.    Color darkgray = new Color(207, 207, 207);
  13.    Color middlegray = new Color(222, 222, 222);
  14.    Color darkgreen = new Color(10, 43, 10);
  15.    Color black = new Color(0, 0, 0);
  16.    Color yellow = new Color(255, 255, 0);
  17.    Color green = new Color(0, 255, 0);
  18.    Color orange = new Color(255, 128, 0);
  19.    Color red = new Color(255, 63, 63);
  20.  
  21.    public String getAppletInfo() {
  22.       return "Scrolling Text by Christoph Schaffhauser";
  23.    }
  24.  
  25.    public void init() {
  26.    }
  27.  
  28.    public void paint(Graphics var1) {
  29.    }
  30.  
  31.    public boolean mouseUp(Event var1, int var2, int var3) {
  32.       return true;
  33.    }
  34.  
  35.    public void start() {
  36.       if (this.killme == null) {
  37.          this.killme = new Thread(this);
  38.          this.killme.start();
  39.       }
  40.  
  41.    }
  42.  
  43.    public void stop() {
  44.       this.killme = null;
  45.    }
  46.  
  47.    public void run() {
  48.       ((Component)this).getGraphics();
  49.  
  50.       while(this.killme != null) {
  51.          try {
  52.             Thread.sleep(1000L);
  53.          } catch (InterruptedException var1) {
  54.          }
  55.       }
  56.  
  57.       this.killme = null;
  58.    }
  59. }
  60.